<template>
  <div class="example example1">
    <video
      id="my-player"
      class="video-js"
      poster="//vjs.zencdn.net/v/oceans.png"
    >
      <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4"/>
    </video>
  </div>
</template>
<script>

// 引入video.js相关的js和css
import videojs from 'video.js'
import "video.js/dist/video-js.min.css"


export default {
  name: 'App',
  mounted(){
    let options = {
      width:960,
      height:400,
      autoplay:'any',
      fluid:true
    }
    videojs('my-player',options,function(){
      console.log('播放器准备就绪')
    })
  }
}
</script>
<style>
.example{
  width: 1000px;
  margin: auto;
  padding: 20px;
}
</style>

